package loader;

import ravi_03.MyService;

import java.util.ServiceLoader;




public class myTwo {
    public static void main(String[] args) {
        //加载服务
        ServiceLoader<MyService> load = ServiceLoader.load(MyService.class);
        //遍历
        for (MyService service:load
             ) {
            service.service();
        }


    }
}
